﻿using dz.inner.jky.api.service;
using dz.u9.jky.schema.InvDoc;
using System.Collections.Generic;
using System;
using System.Web.Http;
using dz.u9.jky.schema.Common;

namespace dz.inner.jky.api
{
    /// <summary>
    /// 调入单
    /// </summary>
    public class DzTransferInJkyController : DzBaseController
    {
        private TransferInService service = new TransferInService();

        [HttpPost]
        public U9CResult AddAndAudit(DzTransferIn dto)
        {
            List<Action<CommonDoc>> action = new List<Action<CommonDoc>>() { service.Submit, service.Audit };

            return util.U9Invoke(service.Add, action, ToCommonDoc, dto);
        }

        [HttpPost]
        public U9CResult Add(DzTransferIn dto)
        { 
            return service.Add(dto);
        }
    }
}
